#!/usr/bin/env python

import redis,sys
sys.path.append('/cihi/app/include')
import init

k = init.INIT()

print '''#!/usr/bin/env python
# -*- coding: utf8 -*-
import sys
sys.path.append(sys.path[0]+'/../../include')
import init

k = init.INIT()'''

for server in  k.getMonitorList('server'):
    print "k.saveSSet('cihi_monitor',\'%s\')" % server
    print "k.saveHash(\'%s_att\',%s)" % (server,k.getMonitorAtt(server))
for client in k.getMonitorList('client'):
    print "k.saveSSet('cihi_monitor',\'%s\',10000)" % client
    print "k.saveHash(\'%s_att\',%s)" % (client,k.getMonitorAtt(client))
